package sushi

type Sushi struct {
	id       int
	maker_id int
}

var sushiid int = 1

var lock chan bool = make(chan bool, 1)

type Transporter chan Sushi

func (receiver Sushi) Getid() int {
	return receiver.id
}
func (receiver Sushi) Getmakerid() int {
	return receiver.maker_id
}

func GetSushi(maker int) Sushi {
	lock <- true
	sushiid++
	<-lock
	s := Sushi{
		sushiid,
		maker,
	}
	return s
}
